import React from 'react';
import { Component } from "@tarojs/taro-rn";
import { Image, View } from "@tarojs/components-rn";
import share_icon from "../assets/img/share_arrow.png";
import close_icon from "../assets/img/icon_close_bold.png";
// 举报组件
let ShareModel = class ShareModel extends Component {
  constructor(props) {
    super(props);
    this.state = {
      isShare: false
    };
  }
  componentWillMount() {
    let isShare = this.props.isShare;
    this.setState({ isShare });
  }
  onClose() {
    this.props.onClose(false);
  }
  render() {
    let { isShare } = this.state;
    return <View>
        <View className={isShare ? 'share-arrow share-arrow-active' : 'share-arrow'}>
          <Image className="share-arrow-icon" src={share_icon} />
          <View className="con">
            <View>请点击右上角</View>
            <View>通过【发送给朋友】</View>
            <View>分享给好友</View>
          </View>
          <Image className="close-icon" onClick={this.onClose.bind(this)} src={close_icon} />
        </View>
      </View>;
  }
};

export default ShareModel;